package com.gateway.pay.channel.strategy;

import com.gateway.pay.channel.dto.BaseRequest;
import com.gateway.pay.channel.dto.BaseResponse;
import com.gateway.pay.channel.dto.Result;

public interface IThirdPartyStrategy {

    /**
     * 判断是否为当前请求所支持的适配器子类
     * @param adapter
     * @return
     */
    boolean support(Object adapter);

    /**
     * 具体业务
     *
     * @param request
     * @return
     */
    Result register(BaseRequest request);


    default Result doRegister(BaseRequest request) {
        BaseResponse response = BaseResponse.builder().build();
        return Result.success(response);
    }
}
